<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/validate.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/layer.jsp" />
<script type="text/javascript"
	src="${path}/style_lib/upload/swfupload/swfupload.js"></script>
<script type="text/javascript"
	src="${path}/style_lib/upload/swfupload/fileprogress.js"></script>
<script type="text/javascript"
	src="${path}/style_lib/upload/swfupload/handlers.js"></script>
<script type="text/javascript">
	$(function() {
		$("select[name='mac_id']").val("${apply.mac_id}");
		$("select[name='seal_id']").val("${apply.seal_id}");
		$("select[name='is_out']").val("${apply.is_out}");
		$("select[name='use_type']").val("${apply.use_type}");
		$("#form1").validate({
			ignore : [],
			rules : {
				'wkflow_id' : {
					required : true
				},
				'office_opinion' : {
					required : true
				}
			}
		});
	});
	function pass() {
		$("input[name=verify]").val("已通过");
		mysubmit();
	}
	function unpass() {
		$("input[name=verify]").val("未通过");
		mysubmit();
	}
	function mysubmit() {
		if (confirm("确认执行该审批吗？")) {
			$("#form1").submit();
		}
	}
</script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<jsp:include page="/WEB-INF/jsp/common/select_user.jsp" />
	<jsp:include page="/WEB-INF/jsp/common/select_type.jsp" />
	<jsp:include page="/WEB-INF/jsp/common/select_word.jsp" />
	<!-- 内容 -->
	<div>
		<form method="post"
			action="${path}/ix/useapply/apply/verify/verify.htm" id="form1">
			<input name='verify_id' type="hidden" value="${verify._id }" />
			<input name='verify' type="hidden" value="" />
			<h2>
				<div>印章使用申请</div>

			</h2>
			<table width="100%" class="lindex">
				<tr>
					<th align="right" style="min-width: 100px;">用印事由</th>
					<td align="left">${apply.reason }</td>
					<th align="right">主送单位</th>
					<td align="left">${apply.company }</td>
				</tr>

				<tr>
					<th align="right">印章仪名称</th>
					<td align="left"><select name="mac_id" disabled="disabled">
							<option value="">--请选择--</option>
							<c:forEach items="${macList}" var="v">
								<option value="${v._id}">${v.code}</option>
							</c:forEach>
					</select></td>

					<th align="right">印章名称</th>
					<td align="left"><select name="seal_id" disabled="disabled">
							<option value="">--请选择--</option>
							<c:forEach items="${sealList}" var="v">
								<option value="${v._id}">${v.name}(${v.true_code})</option>
							</c:forEach>
					</select></td>
				</tr>
				<tr>
					<th align="right">对外用印</th>
					<td align="left"><select name="is_out" disabled="disabled">
							<option value="否">否</option>
							<option value="是">是</option>
					</select></td>
					<th align="right">用印方式</th>
					<td align="left"><select name="use_type" disabled="disabled">
							<option value="柜员自主用印">柜员自主用印</option>
							<option value="本地验密用印">本地验密用印</option>
							<option value="远程验密用印">远程验密用印</option>
					</select></td>
				</tr>
				<tr>
					<th align="right">用印份数</th>
					<td align="left">${apply.copes }</td>
					<th align="right">盖章数/份</th>
					<td align="left">${apply.num }</td>
				</tr>
				<tr>
					<th align="right">申请人</th>
					<td align="left">${user.uname }</td>
					<th align="right">发起人</th>
					<td align="left">${apply.promoter }</td>
				</tr>
				<tr>
					<th align="right">申请部门</th>
					<td align="left">${apply.apply_department }</td>
					<th align="right">申请时间</th>
					<td align="left">${apply.apply_time }</td>
				</tr>
				<tr>
					<th align="right">申请事由<br />具体描述
					</th>
					<td align="left" colspan="3">${apply.note }</td>
				</tr>
				<tr>
					<th align="right">办公室意见</th>
					<td align="left">${apply.office_opinion}</td>
					<th align="right">行长意见</th>
					<td align="left"><c:forEach items="${verifyList}" var="v"
							varStatus="i">
							<c:if test="${fn:length(verifyList)==i.index+1}">
								<c:if test="${v.verify=='待审批'}">
									<textarea name="president_opinion" rows="5" cols="30">${apply.president_opinion}</textarea>
								</c:if>
							</c:if>
						</c:forEach></td>
				</tr>
				<tr>
					<th align="right">主题词</th>
					<td align="left" colspan="3">类别词： ${apply.type_name } 文种词：
						${apply.word_name }</td>
				</tr>
				<tr>
					<th align="right">注解</th>
					<td align="left" colspan="3">${apply.other_note }</td>
				</tr>
				<tr>
					<th align="right">用印申请附件</th>
					<td align="left" colspan="3"><span id="apply_file_ids">
							<c:forEach items="${files.apply_files}" var="m">
								<span id='${m._id}'> <a
									href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
								</span>
							</c:forEach>
					</span> <input type="hidden" name="apply_file_ids"
						value="${apply.apply_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">部门审查附件</th>
					<td align="left" colspan="3"><span id="check_file_ids">
							<c:forEach items="${files.check_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="check_file_ids"
						value="${apply.check_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">法律审查附件</th>
					<td align="left" colspan="3"><span id="law_file_ids"> <c:forEach
								items="${files.law_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="law_file_ids"
						value="${apply.law_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">自定义附件</th>
					<td align="left" colspan="3"><span id="self_file_ids">
							<c:forEach items="${files.self_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="self_file_ids"
						value="${apply.self_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">自定义附件</th>
					<td align="left" colspan="3"><span id="other_file_ids">
							<c:forEach items="${files.other_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="other_file_ids"
						value="${apply.other_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">审批流程</th>
					<td align="left" colspan="3"><c:forEach items="${verifyList}"
							var="v">
							${v.job_name} ${v.verify} ${v.uname} ${v.verify_date}<br />
						</c:forEach></td>
				</tr>
			</table>
			<div class="options">
				<a href="javascript:pass();" class="asave">【审批通过】</a> <a
					href="javascript:unpass();" class="asave">【审批不通过】</a> <a
					href="javascript:goBack();" class="asave">【返回】</a>
			</div>
		</form>

	</div>
</body>
</html>